package com.lianboke.link.ad.entry;

import android.text.TextUtils;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;
import org.greenrobot.greendao.annotation.Unique;

/**
 *  类型任务数据表
 * Created by admin on 2018/1/7.
 */
@Entity
public class OrdetTypeTable {

    @Id(autoincrement = true)
    private Long _id;//自增id

    @Unique
    private Long orderId;//任务id
    private String name;//任务名称
    private String img;//图片地址
    private String desc;//app 描述
    private Integer  type;//任务类型 1： 装机任务   2：注册任务  3： 试玩任务  4：互助任务）
    private String memo;//操作手册（任务描述）
    private Float price;//价格
    private Integer interval;//间隔天数
    private Integer duration;//使用天数
    private Integer intervaltype;//间隔类型（ 1:连续   2：间隔）
    private String appdownload;//app 的下载地址（注册任务为weburl 时为空，可以时多个下载地址）
    private String appname;//app 包名(com.app.packname)
    private String studyurl;//视频教程地址
    private String entryurl ;//注册任务时，任务信息地址（仅注册任务）

    //缓存数据库字段
    private String createTime;//创建时间
    private String firstLaunchTime;//首次启动时间(认领任务的时间,一次记录，无法修改)
    private String lastLaunchTime;//最后的启动时间
    private String durationLaunchTimes;//需要启动的时间
    private String orderNumber;//任务的订单号


    @Generated(hash = 1842906878)
    public OrdetTypeTable(Long _id, Long orderId, String name, String img, String desc, Integer type, String memo, Float price, Integer interval, Integer duration, Integer intervaltype, String appdownload, String appname, String studyurl, String entryurl, String createTime, String firstLaunchTime, String lastLaunchTime, String durationLaunchTimes,
            String orderNumber) {
        this._id = _id;
        this.orderId = orderId;
        this.name = name;
        this.img = img;
        this.desc = desc;
        this.type = type;
        this.memo = memo;
        this.price = price;
        this.interval = interval;
        this.duration = duration;
        this.intervaltype = intervaltype;
        this.appdownload = appdownload;
        this.appname = appname;
        this.studyurl = studyurl;
        this.entryurl = entryurl;
        this.createTime = createTime;
        this.firstLaunchTime = firstLaunchTime;
        this.lastLaunchTime = lastLaunchTime;
        this.durationLaunchTimes = durationLaunchTimes;
        this.orderNumber = orderNumber;
    }

    @Generated(hash = 1158766545)
    public OrdetTypeTable() {
    }

    

    

    

    

    
    


    //--------------------------set 方法--------------------


    public void set_id(Long _id) {
        this._id = _id;
    }

    public void setId(Long orderId) {
        this.orderId = orderId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setImg(String img) {
        this.img = img;
    }
    public void setAppname(String appname) {
        this.appname = appname;
    }
    public void setStudyurl(String studyurl) {
        this.studyurl = studyurl;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public void setPrice(Float price) {
        this.price = price;
    }



    public void setAppdownload(String appdownload) {
        this.appdownload = appdownload;
    }

    public void setEntryurl(String entryurl) {
        this.entryurl = entryurl;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public void setInterval(Integer interval) {
        this.interval = interval;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public void setIntervaltype(Integer intervaltype) {
        this.intervaltype = intervaltype;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setFirstLaunchTime(String firstLaunchTime) {
        this.firstLaunchTime = firstLaunchTime;
    }

    public void setLastLaunchTime(String lastLaunchTime) {
        this.lastLaunchTime = lastLaunchTime;
    }

    public void setDurationLaunchTimes(String durationLaunchTimes) {
        this.durationLaunchTimes = durationLaunchTimes;
    }

    //===================get  方法================


    public Long get_id() {
        return _id;
    }

    public String getDesc() {
        if(TextUtils.isEmpty(desc)){
            return "";
        }else{
            return desc;
        }
    }

    public String getMemo() {
        if(TextUtils.isEmpty(memo)){
            return "";
        }else{
            return memo;
        }
    }

    public String getAppdownload() {
        if(TextUtils.isEmpty(appdownload)){
            return "";
        }else{
            return appdownload;
        }
    }

    public String getEntryurl() {
        return entryurl;
    }

    public Long getId() {
        return orderId;
    }

    public String getName() {
        if(TextUtils.isEmpty(name)){
            return "";
        }else{
            return name;
        }
    }

    public String getImg() {
        if(TextUtils.isEmpty(img)){
            return "";
        }else{
            return img;
        }
    }


    public String getAppname() {
        if(TextUtils.isEmpty(appname)){
            return "";
        }else {
            return appname;
        }
    }

    public String getStudyurl() {
        if(TextUtils.isEmpty(studyurl)){
            return "";
        }else {
            return studyurl;
        }
    }
    public Float getPrice() {
        return price;
    }

    public Integer getType() {
        return type;
    }

    public Integer getInterval() {
        return interval;
    }

    public Integer getDuration() {
        return duration;
    }

    public Integer getIntervaltype() {
        return intervaltype;
    }

    public String getCreateTime() {
        return createTime;
    }

    public String getFirstLaunchTime() {
        return firstLaunchTime;
    }

    public String getLastLaunchTime() {
        return lastLaunchTime;
    }

    public String getDurationLaunchTimes() {
        return durationLaunchTimes;
    }

    public Long getOrderId() {
        return this.orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    @Override
    public String toString() {
        return "OrdetTypeTable{" +
                "_id=" + _id +
                ", orderId=" + orderId +
                ", name='" + name + '\'' +
                ", img='" + img + '\'' +
                ", desc='" + desc + '\'' +
                ", type=" + type +
                ", memo='" + memo + '\'' +
                ", price=" + price +
                ", interval=" + interval +
                ", duration=" + duration +
                ", intervaltype=" + intervaltype +
                ", appdownload='" + appdownload + '\'' +
                ", appname='" + appname + '\'' +
                ", studyurl='" + studyurl + '\'' +
                ", entryurl='" + entryurl + '\'' +
                ", createTime='" + createTime + '\'' +
                ", firstLaunchTime='" + firstLaunchTime + '\'' +
                ", lastLaunchTime='" + lastLaunchTime + '\'' +
                ", durationLaunchTimes='" + durationLaunchTimes + '\'' +
                '}';
    }

    public String getOrderNumber() {
        return this.orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }
}
